<template>
  <span>
    <svg
      :style="{width:width, height:height}"
      class="Symbol icon svg-icon"
      aria-hidden="true">
      <use :[svgHref]="svgIcon[iconHref]"/>
    </svg>
  </span>
</template>

<script>
import { svgIcon } from './svg_icon.js'
export default {
  name: 'SvgIcon',
  props: {
    // 宽度
    width: {
      type: Number,
      default: 18
    },
    // 高度
    height: {
      type: Number,
      default: 18
    },
    iconHref: {
      type: String,
      default: ''
    }
  },
  created () {
    console.log('=====terumoIcon:', svgIcon[this.iconHref])
  },
  data () {
    return {
      svgHref: 'xlink:href',
      svgIcon
    }
  }
}
</script>

<style lang='less'>
</style>
